VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Cleaning a string from ',-.()!_$*<>/\?;:=+

by Van Den Driessche Fran?ois (2 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 14th April 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Cleaning a string from " ',-.()!_$*<>/\?;:=+"

Rate Cleaning a string from ',-.()!_$*<>/\?;:=+




    Dim nLength As Integer
    Dim nStart As Integer
    Dim sOne As String
    Dim sNoWay As String
    '
    sNoWay = " ',-.()!_$*<>/\?;:=+" 'The first one is a space.
                                    'Feel free to put or get other
                                    'literals in or out the NoWay's
                                    'string.
    If Not IsNull(sString) Then
        nLength = Len(sString)
        nStart = 1
        Do While nStart <= nLength
            sOne = Mid(sString, nStart, 1)
            If InStr(1, sNoWay, sOne, vbTextCompare) = 0 Then
                Clean = Clean & sOne
            End If
            nStart = nStart + 1
        Loop
    End If
End Function

Download this snippet    Add to My Saved Code

Cleaning a string from ',-.()!_$*<>/\?;:=+ Comments

No comments have been posted about Cleaning a string from ',-.()!_$*<>/\?;:=+. Why not be the first to post a comment about Cleaning a string from ',-.()!_$*<>/\?;:=+.

Post your comment

Subject:
Message:
0/1000 characters